﻿<primitives:DialogBase x:Class="Neurotoxin.Godspeed.Shell.Views.Dialogs.UserStatisticsParticipationDialog"
                       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                       xmlns:primitives="clr-namespace:Neurotoxin.Godspeed.Shell.Primitives" 
                       xmlns:co="clr-namespace:Neurotoxin.Godspeed.Presentation.Converters;assembly=Neurotoxin.Godspeed.Presentation"
                       xmlns:f="clr-namespace:Neurotoxin.Godspeed.Shell.Views.Formatters"
                       xmlns:lex="http://wpflocalizeextension.codeplex.com"
                       xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
                       lex:LocalizeDictionary.DesignCulture="en-US"
                       lex:ResxLocalizationProvider.DefaultAssembly="Neurotoxin.Godspeed.Shell"
                       lex:ResxLocalizationProvider.DefaultDictionary="Resources"
                       Width="500" Title="{lex:LocText UserStatisticsParticipation}">
    <primitives:DialogBase.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Themes/WhistlerBlue.xaml" />
                <ResourceDictionary>
                    <co:BooleanOrConverter x:Key="BooleanOrConverter" />
                </ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>

    </primitives:DialogBase.Resources>

    <Grid x:Name="LayoutRoot" Margin="10">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <Border Background="White" BorderThickness="1" BorderBrush="{StaticResource NormalBorderBrush}"
             Padding="5" Margin="0,0,0,10">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <xctk:RichTextBox Grid.Row="0" x:Name="Description" BorderThickness="0" Background="Transparent"
                                      Text="{lex:LocText UserStatisticsParticipationContent}" Margin="0,0,0,10">
                    <xctk:RichTextBox.TextFormatter>
                        <f:HtmlFormatter/>
                    </xctk:RichTextBox.TextFormatter>
                </xctk:RichTextBox>

                <RadioButton Grid.Row="1" Content="{lex:LocText YesImWillingToParticipate}" x:Name="Yes" Margin="0,0,0,5" GroupName="Participation" />
                <RadioButton Grid.Row="2" Content="{lex:LocText NoIWouldNotLikeToParticipate}" x:Name="No" GroupName="Participation" />
            </Grid>
        </Border>

        <StackPanel Grid.Row="5" HorizontalAlignment="Right" Orientation="Horizontal">
            <Button Width="75" Content="{lex:LocText Ok}" Click="OkButtonClick">
                <Button.IsEnabled>
                    <MultiBinding Converter="{StaticResource BooleanOrConverter}">
                        <Binding ElementName="Yes" Path="IsChecked" />
                        <Binding ElementName="No" Path="IsChecked" />
                    </MultiBinding>
                </Button.IsEnabled>
            </Button>
        </StackPanel>
    </Grid>
</primitives:DialogBase>